package com.tang.model.clone;

import java.util.Date;

/**
 * @Author sisyphus
 * @DATE 2022/4/27 7:49
 * @Desc
 * @Remarks
 */
public class Car implements Cloneable {
    private String name;
    private Date date;

    public Car() {

    }

    public Car(String name, Date date) {
        this.name = name;
        this.date = date;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    /**
     * @return
     * @throws CloneNotSupportedException
     */
    @Override
    protected Car clone() throws CloneNotSupportedException {
        Car clone = (Car) super.clone();
        clone.date = (Date) this.date.clone();
        return clone;
    }
}
